<?php


namespace App\Command\Tools;


use EchoPHP\Console\Command;

class Encryptpwd extends Command {

    protected $signature = "tools:Encryptpwd {password : 明文密码} {key? : 密钥}";
    protected $description = '用于将明文密码转为可逆密文';

    public function handle() {
        $password = $this->input->getArgument('password');
        $key = $this->input->getArgument('key');
        $encryptedPwd = encrypt($password, $key);
        $this->output->writeln($encryptedPwd);
    }
}